<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title>新建网页</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="description" content="" />
        <meta name="keywords" content="" />

        <link rel="stylesheet" style="text/css" href="./css/talk.css" />

        <script type="text/javascript">
        
        function f1(){

            var xhr = new XMLHttpRequest();
            xhr.onreadystatechange =function(){

                if (xhr.readyState==4) {

                 alert(xhr.responseText);
                }
            }
            xhr.open('get','./data.php');
            xhr.send(null);
        }


        </script>

        <style type="text/css">
        </style>
    </head>


    <body>
        <h2>获取天气预报信息</h2>
        <input type="button" value="获取天气" onclick="f1()"/>
       
    </body>
</html>

